
import React from "react";
import {useLocation,useNavigate,useParams} from "react-router-dom"
function withRouter (Com) {
    return (props)=>{
       
        const navigate = useNavigate()
        return <Com {...props} router={navigate}></Com>
    }
}
export default withRouter